perm filename TESTFO.TEX[TEX,SYS]2 blob sn#784716 filedate 1985-02-08 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	% This file is still being written and changed frequently.
C00012 ENDMK
C⊗;
% This file is still being written and changed frequently.
% Eventually it is supposed to provide a testbed for font evaluation.

\tracinglostchars=0
\raggedright
\raggedbottom
\nopagenumbers
\parindent=0pt
\newlinechar=`@

\newcount\m \newcount\n \newdimen\dim
\chardef\other=12

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\def\hours{\n=\time \divide\n 60
  \m=-\n \multiply\m 60 \advance\m \time
  \twodigits\n\twodigits\m}
\def\twodigits#1{\ifnum #1<10 0\fi \number#1}

\catcode`\|=0 \catcode`\\=\other
|def|help{|message{%
\init switches to another font;@%
\end or \bye finishes the run;@%
\table prints the font layout in tabular format;@%
\text prints a sample text, assuming TeX text font conventions;@%
\sample combines \table and \text;@%
\mixture mixes a background character with a series of others;@%
\alternation interleaves a background character with a series;@%
\alphabet prints all lowercase letters within a given background;@%
\ALPHABET prints all uppercase letters within a given background;@%
\lowers prints a comprehensive test of lowercase;@%
\uppers prints a comprehensive test of uppercase;@%
\digits prints a comprehensive test of numerals;@%
\names prints a text that mixes upper and lower case;@%
\punct prints a punctuation test;@%
\bigtest combines many of the above routines;@%
\leading increases
\help repeats this message.}}
|catcode`\=0

\def\notyet{\message{(Sorry, that's not here yet.)}}
\let\alphabet=\notyet
\let\ALPHABET=\notyet
\let\lowers=\notyet
\let\uppers=\notyet
\let\digits=\notyet
\let\names=\notyet
\let\punct=\notyet
\let\bigtest=\notyet

\def\setbaselineskip{\setbox0=\hbox{\n=0
\loop\char\n \ifnum \n<255 \advance\n 1 \repeat}
\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }

\def\setchar#1{{\escapechar-1\message{\string#1 character = }%
  \def\do##1{\catcode`##1=\other}\dospecials
  \read-1 to\next
  \expandafter\finsetchar\next\next#1}}
\def\finsetchar#1#2\next#3{\global\chardef#3=`#1
  \ifnum #3=`\# \global\chardef#3=#2 \fi}
\def\promptthree{\setchar\background
  \setchar\starting \setchar\ending}

\def\init{\message{@Name of the font to test = }
  \read-1 to\fontname
  \font\testfont=\fontname
  \leftline{\sevenrm Test of \fontname\unskip\ on \today\ at \hours}
  \medskip
  \testfont\setbaselineskip
  \message{Now type a test command (\string\help\space for help):}}

\def\mixture{\promptthree \domix\mixpattern}
\def\alternation{\promptthree \domix\altpattern}
\def\mixpattern{\0\1\0\0\1\1\0\0\0\1\1\1\0\1}
\def\altpattern{\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0}

\def\domix#1{\chardef\0=\background \n=\starting
  \loop \chardef\1=\n #1\endgraf
  \ifnum \n<\ending \advance\n 1 \repeat}

\def\table{\beginchart\normalchart\endchart}
\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
\def\oddline#1{\cr
  \noalign{\nointerlineskip}
  \multispan{19}\hrulefill&
  \setbox0=\hbox{\lower 2.3pt\hbox{\hex{#1x}}}\smash{\box0}\cr
  \noalign{\nointerlineskip}}
\def\evenline{\cr\noalign{\hrule}}
\def\chartstrut{\lower4.5pt\vbox to14pt{}}
\def\beginchart{$$\global\n=0
  \halign to\hsize\bgroup
    \chartstrut##\tabskip0pt plus10pt&
    &\hfil##\hfil&\vrule##\cr
    \lower6.5pt\null
    &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
\def\endchart{\raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
  &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$}
\def\:{\setbox0=\hbox{\char\n}%
  \ifdim\ht0>7.5pt\reposition
  \else\ifdim\dp0>2.5pt\reposition\fi\fi
  \box0\global\advance\n 1 }
\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
  \advance\dim 2pt \dp0=\dim}
\def\centerlargechars{
  \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
\def\normalchart{%
  &\oct{00x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline0
  &\oct{01x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{02x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline1
  &\oct{03x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{04x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline2
  &\oct{05x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{06x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline3
  &\oct{07x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{10x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline4
  &\oct{11x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{12x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline5
  &\oct{13x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{14x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline6
  &\oct{15x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline
  &\oct{16x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\oddline7
  &\oct{17x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&\evenline}

\def\text{{\advance\baselineskip-4pt
On November 14, 1885, Senator and Mrs.~Leland Stanford called
together at their San Francisco mansion the 24 prominent men who had
been chosen as the first trustees of The Leland Stanford Junior University.
They handed to the board the Founding Grant of the University, which they
had executed three days before. This document, with various amendments,
legislative acts, and court decrees, remains as the University's charter.
In bold, sweeping language it stipulates that the objectives of the University
are ``to qualify students for personal success and direct usefulness in life;
and to promote the public welfare by exercising an influence in behalf of
humanity and civilization, teaching the blessings of liberty regulated by
law, and inculcating love and reverence for the great principles of
government as derived from the inalienable rights of man to life, liberty,
and the pursuit of happiness.'' \moretext
(THE QUICK BROWN DOG JUMPED OVER 854.9176302 LAZY FOXES.)\par}}
\def\moretext{However, Kafka's Schlo\ss\ and \AE sop's \OE uvres are
often na{\"\i}ve  vis-\`a-vis the d\ae monic ph\oe nix's official r\↑ole
in fluffy souffl\'es. }
\def\omitaccents{\let\moretext=\relax}

\def\sample{\table\text}

\init